import request from '@/utils/request'

// 查询销售单产品行列表
export function listLine(query) {
  return request({
    url: '/xs/line/list',
    method: 'get',
    params: query
  })
}

// 查询销售单产品行详细
export function getLine(lineId) {
  return request({
    url: '/xs/line/' + lineId,
    method: 'get'
  })
}

// 新增销售单产品行
export function addLine(data) {
  return request({
    url: '/xs/line',
    method: 'post',
    data: data
  })
}

// 修改销售单产品行
export function updateLine(data) {
  return request({
    url: '/xs/line',
    method: 'put',
    data: data
  })
}

// 删除销售单产品行
export function delLine(lineId) {
  return request({
    url: '/xs/line/' + lineId,
    method: 'delete'
  })
}

// 根据销售单号查询销售单产品行
export function ListBySoNumber(query) {
  return request({
    url: '/xs/line/byNumber',
    method: 'get',
    params: query
  })
}

// 查询销售单产品行列表
export function orderListLine(query) {
  return request({
    url: '/xs/line/getoWorkorderList',
    method: 'get',
    params: query
  })
}

// 查询销售订单明细报表
export function listOrderLineStatement(query) {
  return request({
    url: '/xs/line/orderLineStatement',
    method: 'get',
    params: query
  })
}

// 查询订单执行明细报表
export function listOrderExecuteStatement(query) {
  return request({
    url: '/xs/line/orderExecuteStatement',
    method: 'get',
    params: query
  })
}

// 查询发出商品明细报表
export function listOrderShippedStatement(query) {
  return request({
    url: '/xs/line/orderShippedStatement',
    method: 'get',
    params: query
  })
}

// 查询销售退货明细报表
export function listOrderReturnStatement(query) {
  return request({
    url: '/xs/line/orderReturnStatement',
    method: 'get',
    params: query
  })
}

// 查询产品销售排名报表
export function listItemRankingStatement(query) {
  return request({
    url: '/xs/line/itemRankingStatement',
    method: 'get',
    params: query
  })
}

// 查询销售员业绩统计报表
export function listSalesPersonStatement(query) {
  return request({
    url: '/xs/line/salesPersonStatement',
    method: 'get',
    params: query
  })
}


//客户调拨选择订单使用接口
export function getDetails(query) {
  return request({
    url: '/xs/line/getDetails',
    method: 'get',
    params: query
  })
}
